<div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i>
            <a href="/jscss/admin">首页</a>
            <span class="crumb-step">&gt;</span>
            <span class="crumb-name">订单管理</span>
            </div>
        </div>
        <div class="search-wrap">
            <div class="search-content">
                <form action="<?=site_url('admini/order/index')?>" method="get">
                    <table class="search-tab">
                        <tr>
                            <th width="80">下单时间:</th>
                            <td>
                                <input class="common-text laydate-icon" placeholder="开始时间" name="start" value="<?=empty($_GET['start']) ? '' : $_GET['start'] ?>" id="start" type="text" readonly="readonly">
                                -
                                <input class="common-text laydate-icon" placeholder="结束时间" name="end" value="<?=empty($_GET['end']) ? '' : $_GET['end'] ?>" id="end" type="text" readonly="readonly">
                            </td>
                            <th width="70">查询方式:</th>
                            <td>
                                <select name="oid" id="">
                                    <option value="oid">订单号</option>
                                    <option value="20">支付单号</option>
                                    <option value="20">收货人</option>
                                    <option value="20">商品名称</option>
                                </select>
                            </td>

                            <th width="70">关键字:</th>
                            <td><input class="common-text" placeholder="关键字" name="keywords" value="" id="date" type="text"></td>

                            <td><input class="btn btn-primary btn2" value="查询" type="submit"></td>
                            <td><a class="btn btn-primary btn2" href="<?=site_url('admini/order/index')?>">重置查询</a></td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
        <div class="result-wrap">
            <form name="myform" id="myform" method="post">
                <div class="result-title">
                    <div class="result-list">
                    	<a id="updateOrd" href="<?=site_url('admini/order/index')?>" style="color: <?php if(empty($_GET['last'])) echo 'red';?>"><i class="icon-font"></i>查看全部</a>
                        <a id="updateOrd" href="<?=site_url('admini/order/index?last=9')?>" style="color: <?php if(!empty($_GET['last']) && $_GET['last'] == 9) echo 'red';?>"><i class="icon-font"></i>未付款</a>
                        <a id="updateOrd" href="<?=site_url('admini/order/index?last=1')?>" style="color: <?php if(!empty($_GET['last']) && $_GET['last'] == 1) echo 'red';?>"><i class="icon-font"></i>已付款</a>
                        <a id="updateOrd" href="<?=site_url('admini/order/index?last=2')?>" style="color: <?php if(!empty($_GET['last']) && $_GET['last'] == 2) echo 'red';?>"><i class="icon-font"></i>待发货</a>
                        <a id="updateOrd" href="<?=site_url('admini/order/index?last=3')?>" style="color: <?php if(!empty($_GET['last']) && $_GET['last'] == 3) echo 'red';?>"><i class="icon-font"></i>待收货</a>
                        <a id="updateOrd" href="<?=site_url('admini/order/index?last=4')?>" style="color: <?php if(!empty($_GET['last']) && $_GET['last'] == 4) echo 'red';?>"><i class="icon-font"></i>已完成</a>
                        <a id="updateOrd" href="<?=site_url('admini/order/index?last=5')?>" style="color: <?php if(!empty($_GET['last']) && $_GET['last'] == 5) echo 'red';?>"><i class="icon-font"></i>订单关闭</a>
                        <a id="updateOrd" href="<?=site_url('admini/order/index?last=6')?>" style="color: <?php if(!empty($_GET['last']) && $_GET['last'] == 6) echo 'red';?>"><i class="icon-font"></i>订单无效</a>
                        <a id="updateOrd" href="<?=site_url('admini/order/index?last=7')?>" style="color: <?php if(!empty($_GET['last']) && $_GET['last'] == 7) echo 'red';?>"><i class="icon-font"></i>退款/售后</a>
                    </div>
                </div>
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <tr>
                            <th>订单号</th>
                            <th width="260px">商品名称</th>
                            <th>用户</th>
                            <th>价格</th>
                            <th>备注</th>
                            <th>下单时间</th>
                            <th>操作时间</th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                        <?php foreach($list as $k => $v): ?>
                        <tr>
                            <td><?=$v['order_id']?></td>
                            <td><?=mb_substr($v['goods']['name'],0,25)?></td>
                            <td><?=$v['customer']['c_user']?></td>
                            <td><?=$v['price']?></td>
                            <td><?=$v['note']?></td>
                            <td><?=date('Y-m-d H:i:s',$v['create_time'])?></td>
                            <td><?=date('Y-m-d H:i:s',$v['endtime'])?></td>
                            <td><?=$v['status_name']?></td>
                            <td>
                                <a class="link-update" href="<?=site_url('admini/order/info?oid='.$v['id'])?>">详情</a>
                                <!-- <a class="link-update" href="#">修改</a>
                                <a class="link-del" href="#">删除</a> -->
                            </td>
                        </tr>
                        <?php endforeach;?>
                        
                    </table>
                    <div class="list-page"> <?=$page?></div>
                </div>
            </form>
        </div>

<!-- 导入日历插件 -->
<script type="text/javascript" src="<?=base_url('public/lib/laydate/laydate.js')?>"></script>
<script>
!function(){
    laydate.skin('danlan');//切换皮肤，请查看skins下面皮肤库

}();
var start = {
    elem: '#start',
    format: 'YYYY-MM-DD',
    min: '2010-01-01', //设定最小日期为当前日期
    max: laydate.now(), //最大日期
    istime: false,
    istoday: false,

    choose: function(datas){
         end.min = datas; //开始日选好后，重置结束日的最小日期
         end.start = datas //将结束日的初始值设定为开始日
    }
};
var end = {
    elem: '#end',
    format: 'YYYY-MM-DD',
    min: '2010-01-01',
    max: laydate.now(),
    istime: false,
    istoday: false,
    choose: function(datas){
        start.max = datas; //结束日选好后，重置开始日的最大日期
    }
};

laydate(start);
laydate(end);
</script>